<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>六西格玛知识管理</title>
<link href="<?php echo $this->baseUrl ?>/public/style/style.css" rel="stylesheet" type="text/css" />
<link href="<?php echo $this->baseUrl ?>/public/style/daterangepicker.css" rel="stylesheet" type="text/css" />
<link href="<?php echo $this->baseUrl ?>/public/style/jquery-ui.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="<?php echo $this->baseUrl ?>/public/scripts/jquery.js"></script>
<script type="text/javascript" src="<?php echo $this->baseUrl ?>/public/scripts/daterangepicker.js"></script>
<script type="text/javascript" src="<?php echo $this->baseUrl ?>/public/scripts/jquery-ui.js"></script>
<script type="text/javascript" src="<?php echo $this->baseUrl ?>/public/fckeditor/fckeditor.js"></script>
</head>

<body>
<!--头部-->
<?php echo $this->partial('common/header.html', array('template'=>$this->template, 'baseUrl'=>$this->baseUrl)) ?>

<!--主体-->
<div class="main-box" id="mainBox">
    <div class="third-menu">
    <?php echo $this->partial('common/operation.html', array('template'=>$this->template,'uid'=>$this->class[0]['user_id'], 'baseUrl'=>$this->baseUrl, 'id'=>$_GET['class_id'])); ?>
    <div class="menu-title"><span class="icon"></span>班级详细信息页</div>
    </div>
    
    <div class="separate-line"></div>
    <div class="main-form">
    	<div class="project-show">
            <h2 class="project-title"><?php echo $this->class[0]['name']; ?></h2>
            <div class="student-info" style="height:220px">
            	<div class="student-introduce">
                	<ul style="padding-left:30px; float:left">
                    	<li>&nbsp;&nbsp;班主任：
                        	<?php echo !empty($this->strTeacher1)?$this->strTeacher1:'未填写'; ?>
                        </li>
                        <li>班级类型：
                        	<?php foreach ($this->conf->projectType as $key => $val): ?>
                                <?php if($this->class[0]['category']==$key): ?><?php echo $val; ?><?php endif; ?>
                            <?php endforeach; ?>
                        </li>
                        <li>开班时间：
                            <?php echo $this->class[0]['start_time']>0?date("Y-m-d", $this->class[0]['start_time']):'未填写'; ?>
                    	</li>
                        <li>结束时间：
                            <?php echo $this->class[0]['end_time']>0?date("Y-m-d", $this->class[0]['end_time']):'未填写'; ?>
                    	</li>
                        <li>开班地点：
                            <?php echo !empty($this->class[0]['location'])?$this->class[0]['location']:'未填写'; ?>
                        </li>
                        <li>带班老师：
                        	<?php echo !empty($this->strTeacher0)?$this->strTeacher0:'未填写'; ?>
                        </li>
                        <li>&nbsp;&nbsp;联系人：
                        	<?php echo !empty($this->class[0]['linkman'])?$this->class[0]['linkman']:'未填写'; ?>
                        </li>
                        <li>班级收益：
                        	<?php echo !empty($this->class[0]['income'])?$this->class[0]['income']:'未填写'; ?>
                        </li>
                    </ul>
                    <ul style="padding-left:30px; float:left">
                    	<li>开班人数：
                        	<?php echo $this->intAllNum; ?>人
                        </li>
                        <li>毕业人数：
                            <?php echo $this->intPassNum; ?>人
                    	</li>
                        <li>&nbsp;&nbsp;毕业率：
                            <?php echo $this->class[0]['rate']; ?>
                        </li>
                        <li>补考通过：
                        	<?php echo $this->intPassNum1; ?>人
                        </li>
                        <li>&nbsp;&nbsp;待毕业：
                        	<?php echo $this->intNoPassNum; ?>人
                        </li>
                    </ul>  
                </div>
            </div>
            <div class="project-desc">
            	<div class="project-border">
                班级简介：<br />
				<?php echo !empty($this->class[0]['summary'])?$this->class[0]['summary']:'暂无信息'; ?>
            	</div>
            </div>
        </div>
        
        <?php if($this->students): ?>
        <div class="project-show">
        	<div class="project-desc">
            <div class="project-border">
                <dl class="class-info">
                    <dd>
                    <table>
                    <tr align="center">
                    	<th>学员姓名</th>
                        <th>单位</th>
                        <th>职务</th>
                        <th>项目名称</th>
                        <th>注释</th>
                        <th>是否缴费</th>
                    </tr>
                    <?php foreach ($this->students as $key => $val): ?>
                        <tr align="center">
                        	
                        </tr>
                    <?php endforeach; ?>
                    </table>
                    </dd>
                </dl>
            </div>
            </div>
        </div>
        <?php endif; ?>
        
        <div class="project-show">
            <div class="class-list">
                <dl class="class-info">
                	<?php if($this->courses): ?>
                    <?php foreach ($this->courses as $key => $val): ?>
                    <dd>
                    	<b><?php if($key==0): ?>课程信息：<?php else: ?>&nbsp;<?php endif; ?></b>
                        <a href="<?php echo $this->baseUrl ?>/course/detail?course_id=<?php echo $val['course_id']; ?>" target="_blank"><?php echo $val['name']; ?></a>
                    </dd>
                    <?php endforeach; ?>
                    <?php endif; ?>
                    <?php if($this->courses): ?>
                    <?php foreach ($this->projects as $key => $val): ?>
                    <dd>
                    	<b><?php if($key==0): ?>项目信息：<?php else: ?>&nbsp;<?php endif; ?></b>
                        <a href="<?php echo $this->baseUrl ?>/project/detail?project_id=<?php echo $val['project_id']; ?>" target="_blank"><?php echo $val['title'] ?></a>
                    </dd>
                    <?php endforeach; ?>
                    <?php endif; ?>
                </dl>
            </div>
        </div>
        
        <?php if($this->arrStudentClass): ?>
        <div class="project-show">
        	<div class="project-desc">
            <div class="project-border">
                <dl class="class-info">
                    <dd>
                    <table width="760px">
                    <tr><th colspan="7" style="font-size:14px; color:#C00">学生信息</th></tr>
                    <tr align="center"><th width="8%">学生姓名</th><th width="8%">职务</th><th>单位</th><th>注释</th><th>考试情况</th><th>操作</th></tr>
                    <?php foreach ($this->arrStudentClass as $key => $val): ?>
                        <tr align="center">
                        	<form method="post" action="<?php echo $this->baseUrl ?>/class/updateclassstudent">
                            <input type="hidden" name="class_id" value="<?php echo $val['class_id']; ?>" />
                            <input type="hidden" name="student_id" value="<?php echo $val['student_id']; ?>" />
                        	<td><a href="<?php echo $this->baseUrl; ?>/student/detail?student_id=<?php echo $val['student_id']; ?>" target="_blank"><?php echo $val['student_name']; ?></a></td>
                            <td>                            	
                                <?php echo $val['duties']; ?>                               
                            </td>
                            <td>
                            	<a href="<?php echo $this->baseUrl; ?>/company/detail?company_id=<?php echo $val['company_id']; ?>" target="_blank">
                            	<?php echo $val['company_name']; ?>
                                </a>
                            </td>
                            <td>
                            	<textarea name="note" cols="16" rows="1" class="student_area"><?php echo $val['note']; ?></textarea>
                            </td>
           <!--                  <td>
                            	<select name="payment">
                                	<option value="0" <?php if($val['payment']==0) echo "selected='selected'" ?>>未缴费</option>
                                    <option value="1" <?php if($val['payment']==1) echo "selected='selected'" ?>>已缴费</option>
                                </select>
                            </td>
            -->                 
                            <td>
                            	<select name="exam" class="student_select">
                            	<?php foreach ($this->conf->studentExam as $k => $v): ?>
                                	<option value="<?php echo $k; ?>" <?php if($val['exam']==$k) echo "selected='selected'"; ?>>
                                    	<?php echo $v; ?>
                                    </option>
                                <?php if($val['exam']==$k) echo $v; ?>
                                <?php endforeach; ?>
                                </select>
                            </td>
                            <td><input type="submit" value="提交" class="subs" <?php if(isset($_GET['student_id'])&&($_GET['student_id']==$val['student_id'])){?> disabled=true<?php }?>  /></td>
                            </form>
                        </tr>
                    <?php endforeach; ?>
                    </table>
                    </dd>
                </dl>
                <div class="page-bar2">
                <div>总数：<span class="total-count"><?php echo $this->pro_total ?></span></div>
                <div>
                <?php if ($this->pro_page > 1): ?>
                <a href="<?php echo $this->baseUrl ?>/class/detail?class_id=<?php echo $this->class[0]['class_id']; ?>&pro_page=1">首页</a>
                <?php else: ?>
                首页
                <?php endif; ?>
                <?php if ($this->pro_page > 1): ?>
                <a href="<?php echo $this->baseUrl ?>/class/detail?class_id=<?php echo $this->class[0]['class_id']; ?>&pro_page=<?php echo $this->pro_page-1 ?>">上一页</a>
                <?php else: ?>
                上一页
                <?php endif; ?>
                <?php if ($this->pro_page < $this->pro_pages): ?>
                <a href="<?php echo $this->baseUrl ?>/class/detail?class_id=<?php echo $this->class[0]['class_id']; ?>&pro_page=<?php echo $this->pro_page+1 ?>">下一页</a>
                <?php else: ?>
                下一页
                <?php endif; ?>
                <?php if ($this->pro_page < $this->pro_pages): ?>
                <a href="<?php echo $this->baseUrl ?>/class/detail?class_id=<?php echo $this->class[0]['class_id']; ?>&pro_page=<?php echo $this->pro_pages ?>">尾页</a>
                <?php else: ?>
                尾页
                <?php endif; ?>
                </div>
                <div>页数：<span class="page-detail"><?php echo $this->pro_page ?>/<?php echo $this->pro_pages ?></span></div>
          	</div>
            </div>
            </div>
        </div>
        <?php endif; ?>
        
        <div class="mod-comment">
            <div class="head">评论</div>
            <p class="line"></p>
            <?php if($this->comments): ?>
          	<ul class="comment-list">
            	<?php foreach ($this->comments as $key => $val): ?>
                <li>
                    <span class="user"><?php echo $val['teacher_name'];?>：</span>
                    <span class="score">评分：<font color="#CC0000"><?php echo $val['level']; ?></font></span>
                    <span class="recommend">推荐：
                    <?php 
                    	if($val['recommend']==0){
                        	echo '未选择';
                        }elseif($val['recommend']==1){
                        	echo "<font color='green'>推荐</font>";
                        }elseif($val['recommend']==2){
                        	echo "<font color='red'>不推荐</font>";
                        }
                    ?>
                    </span>
                    <span class="time">评论时间：<i><?php echo date('Y-m-d H:i:s',$val['create_time']); ?></i></span>
                    <div class="content">
                    <?php echo $val['content']; ?>
                    </div>
                </li>
                <?php endforeach; ?>
            </ul>
          	<div class="page-bar">
                <div>总数：<span class="total-count"><?php echo $this->total ?></span></div>
                <div>
                <?php if ($this->page > 1): ?>
                <a href="<?php echo $this->baseUrl ?>/class/detail?class_id=<?php echo $this->class[0]['class_id']; ?>&page=1">首页</a>
                <?php else: ?>
                首页
                <?php endif; ?>
                <?php if ($this->page > 1): ?>
                <a href="<?php echo $this->baseUrl ?>/class/detail?class_id=<?php echo $this->class[0]['class_id']; ?>&page=<?php echo $this->page-1 ?>">上一页</a>
                <?php else: ?>
                上一页
                <?php endif; ?>
                <?php if ($this->page < $this->pages): ?>
                <a href="<?php echo $this->baseUrl ?>/class/detail?class_id=<?php echo $this->class[0]['class_id']; ?>&page=<?php echo $this->page+1 ?>">下一页</a>
                <?php else: ?>
                下一页
                <?php endif; ?>
                <?php if ($this->page < $this->pages): ?>
                <a href="<?php echo $this->baseUrl ?>/class/detail?class_id=<?php echo $this->class[0]['class_id']; ?>&page=<?php echo $this->pages ?>">尾页</a>
                <?php else: ?>
                尾页
                <?php endif; ?>
                </div>
                <div>页数：<span class="page-detail"><?php echo $this->page ?>/<?php echo $this->pages ?></span></div>
          	</div>
            <?php endif; ?>
          
          	<div class="comment-form">
                <form method="post" name="form_commend" action="<?php echo $this->baseUrl?>/comment/add">
                <div class="desc">
                    <input type="hidden" name="cid" value="<?php echo $this->class[0]['class_id'];?>" />
                    <input type="hidden" name="category" value="3" />
                    <input type="hidden" name="template" value="<?php echo $this->template?>" />
                    <span class="float-right">
                        <label for="recommend">推荐：</label>
                        <select name="recommend" class="input-text">
                            <option>请选择...</option>
                            <option value="1">推荐</option>
                            <option value="2">不推荐</option>
                        </select>
                    </span>
                    <label for="score">评分：</label>
                    <select name="score" class="input-text">
                    	<?php foreach ($this->conf->score as $key => $val): ?>
                        <option value="<?php echo $val; ?>"><?php echo $val; ?></option>
                        <?php endforeach; ?>
                    </select>
                </div>
                <p class="content">
                    <label for="content">评论内容：</label>
                    <textarea name="content" class="input-textarea"></textarea>
                </p>
                <p><input type="submit" class="button" value="确认提交" style="margin-left:0" /></p>
            	</form>
          	</div>
        </div>
    </div>
</div>
<script>
$(document).ready(function() {
	$(".student_area,.student_select").change(function(){
		$(this).parents("tr").children("td:last-child").children("input").attr("disabled",false); 
	})
})
</script>

<!--底部-->
<?php echo $this->partial('common/footer.html') ?>
</body>
</html>
